package com.own.component.util.excel.util.read.model;

import lombok.Getter;

import java.io.Serializable;
import java.util.List;

/**
 * ResolveData
 *
 * @author chenxueli
 * @date 2022-09-23 10:31:00
 */
@Getter
public class ResolveData<T> implements Serializable {
    /**
     * 行数
     */
    private final int line;
    /**
     * 数据信息
     */
    private final T data;
    /**
     * 是否转换成功
     */
    private final boolean fail;
    /**
     * 转换的信息
     */
    private final List<String> messageList;

    public ResolveData(T data, int line, List<String> messageList) {
        this.data = data;
        this.line = line + 1;
        this.fail = !messageList.isEmpty();
        this.messageList = messageList;
    }

}
